package com.telit.uav.dao;

import com.telit.uav.entity.AppUavTrackDetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


@Repository
public interface AppUavTrackDetailDao {
    int deleteByPrimaryKey(Long id);

    int insert(AppUavTrackDetail record);

    int insertSelective(AppUavTrackDetail record);

    AppUavTrackDetail selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AppUavTrackDetail record);

    int updateByPrimaryKey(AppUavTrackDetail record);


    /**
     * 根据子任务id查询无人机巡航明细
     * @param subTaskId
     * @return
     */
    List<AppUavTrackDetail> queryUavFlyDetailBySubTaskId(@Param("subTaskId") Long subTaskId);


    /**
     * 无人机巡航首页离线无人机信息
     *
     * @param name
     *
     * @return
     */
    Map<String, String> selectLatelyLonAndLat(@Param("name") String name);

    Map<String, String> selectLatelyLonAndLatByUavCode(@Param("uavCode") String uavCode);
    
    List<Map<String, String>> selectLateLonAndLatByUavNameList(@Param("uavNameList") List<String> uavNameList);

}